<!DOCTYPE html>
<html lang="en">
<head>
  <title>教师信息管理系统</title>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <link rel="stylesheet" href="../css/bootstrap.min.css" />
  <link rel="stylesheet" href="../css/bootstrap-responsive.min.css" />
  <link rel="stylesheet" href="../css/colorpicker.css" />
  <link rel="stylesheet" href="../css/datepicker.css" />
  <link rel="stylesheet" href="../css/uniform.css" />
  <link rel="stylesheet" href="../css/select2.css" />
  <link rel="stylesheet" href="../css/matrix-style2.css" />
  <link rel="stylesheet" href="../css/matrix-media.css" />
  <link rel="stylesheet" href="../css/bootstrap-wysihtml5.css" />
  <link href="../font-awesome/css/font-awesome.css" rel="stylesheet" />
  <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,800' rel='stylesheet' type='text/css'>

  <style>
    .control-group .controls label{
      display:inline-block;
    }
    body {
      padding-bottom: 40px;
    }
    .sidebar-nav {
      padding: 9px 0;
    }

    @media (max-width: 980px) {
      /* Enable use of floated navbar text */
      .navbar-text.pull-right {
        float: none;
        padding-left: 5px;
        padding-right: 5px;
      }
    }

  </style>

</head>
<body>

<div id="content">
  <div id="content-header">
    <h1>科研情况</h1>
  </div>
  <div class="container-fluid">
    <div class="row-fluid">
      <div id="form_2" class="span12">
        <button id="adde" class="btn btn-info btn-large" style="border-radius: 5px">添加发表学术论文情况</button>
        <form action="/teacherPaper/leadOut" method="post" style="display: inline-block;">
          <input id="cuId2" name="cuId" type="text" style="display: none" >
          <input type="submit" class="btn btn-info btn-large" style="border-radius: 5px"; value="保存为Excel";>
        </form>
        <div class="widget-box">
          <div class="widget-title"> <span class="icon"> <i class="icon-align-justify"></i> </span>
            <h5>教师发表学术论文情况</h5>
          </div>
          <div class="widget-content nopadding">
            <span id="span1" style="color: red;" className="teacherPaper"></span>
            <table id="t1" class="table table-bordered table-striped" frame="box">
              <thead>
              <tr><th colspan="8" >已添教师发表学术论文情况(删除重新添加以修改)</th></tr>
              <tr>
                <th>编号</th>
                <th>论文名称</th>
                <th>第一作者或通讯作者</th>
                <th>发表期刊</th>
                <th>发表时间</th>
                <th>收录情况 收录索引</th>
                <th>他引次数</th>
                <th>操作</th>
              </tr>
              </thead>
              <tbody id="tbody">

              </tbody>
            </table>
            <div id="form3" class="span12" style="display: none">
              <form id="form1" action="#" method="get" class="form-horizontal">
                <input id="cuId" name="cuId" type="text" style="display: none">

                  <div class="control-group">
                    <label class="control-label">论文名称：</label>
                    <div class="controls">
                      <input name="paperName" type="text" class="span11"  />
                    </div>
                  </div>
                <div class="control-group">
                  <label class="control-label">第一作者或通讯作者 ：</label>
                  <div class="controls">
                    <input name="author" type="text" class="span11"  />
                  </div>
                </div>
                <div class="control-group">
                  <label class="control-label">发表期刊：</label>
                  <div class="controls">
                    <input name="published" type="date" class="span11"  />
                  </div>
                </div>
                <div class="control-group">
                  <label class="control-label">发表时间：</label>
                  <div class="controls">
                    <input name="publishTime" type="date" class="span11"  />
                  </div>
                </div>
              <div class="control-group">
                  <label class="control-label">收录情况 收录索引：</label>
                  <div class="controls">
                  <select  name="record">
                    <option value="SCI">SCI</option>
                    <option value="SSCI">SSCI</option>
                    <option value="A&HCI">A&HCI</option>
                    <option value="EI">EI</option>
                    <option value="ISTP">ISTP</option>
                    <option value="CSSCI">CSSCI</option>
                    <option value="中文核心">中文核心</option>
                  </select>
                  </div>
              </div>
                <div class="control-group">
                  <label class="control-label">他引次数 ：</label>
                  <div class="controls">
                    <input name="citation" type="text" class="span11" />
                  </div>
                </div>
              </form>
              <center>
                <div class="control-group">
                  <div class="controls">
                    Excel：<input id="excel"  type="file" size="15" style="opacity: 0;"><br>
                    <button id="leadIn" class="btn btn-primary btn-large" style="margin-bottom: 20px;border-radius: 5px">导入Excel</button>
                    <button id="btn1" class="btn btn-success btn-large" style="margin-bottom: 20px;border-radius: 5px">保存基本信息</button>
                  </div>
                </div>
              </center>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

<script src="http://www.jq22.com/jquery/jquery-1.7.1.js"></script>
<script src="../js/jquery.ui.custom.js"></script>
<script src="../js/bootstrap.min.js"></script>
<script src="../js/bootstrap-colorpicker.js"></script>
<script src="../js/bootstrap-datepicker.js"></script>

<script src="../js/masked.js"></script>
<script src="../js/jquery.uniform.js"></script>
<script src="../js/select2.min.js"></script>
<script src="../js/matrix.js"></script>
<script src="../js/matrix.form_common.js"></script>
<script src="../js/wysihtml5-0.3.0.js"></script>
<script src="../js/jquery.peity.min.js"></script>
<script src="../js/bootstrap-wysihtml5.js"></script>
<script type="text/javascript" src="../js/jquery.cookie.js"></script>
<script src="../js/tool.js"></script>
<script>
  $(function () {
    var CLASS_NAME=$("#span1").attr("className");
    queryPage(1);
    //保存
    $("#btn1").click(function () {
      var certificate=$("#certificate").val();
      var r = confirm("* 填报说明：\n"+
              "* 1.学术论文指以第一署名单位发表的本专业领域内核心期刊以上的学术论文，同一篇论文只填一次，不重复填写；\n" +
          "* 2.收录情况指论文被SCI、SSCI、A&HCI、EI、ISTP、CSSCI等收录情况；\n" +
          "* 3.国外学术论文以“Web of Science库（含扩展库）”中的“他引次数”为准；\n" +
          "* 4.国内学术论文“他引次数”以CNKI（中国知网学术期刊网络总库）、CSSCI与CSCD源期刊并集库（含扩展库）中的“他引次数”为准，自引不能计算在内；\n" +
          "* 5.填写近四个自然年情况（2015-2019）。\n\n" +
              "\t\t您是否确定保存？")
      if (r == true) {
        add(CLASS_NAME);
      } else {

      }
    })
  })
  //表格填充函数
  function queryPage(pageNum){
    var CLASS_NAME=$("#span1").attr("className");
    //当前页码
    pageNum= pageNum==undefined?1:pageNum;

    //页码的有效性判断
    $.get("../"+CLASS_NAME+"",{page:pageNum,limit:50,cuId:$.cookie("cuId")},function(result){
      console.log(result.data)
      //填充数据到tbody
      $("#tbody").empty();//清除之前的内容
      $(result.data).each(function(index,teacherPaper){
        $("#tbody").append(
                " <tr>"+
                "<td>"+(index+1)+"</td>"+
                "<td>"+teacherPaper.paperName+"</td>"+
                "<td >"+teacherPaper.author+"</td>"+
                "<td >"+teacherPaper.published+"</td>"+
                "<td>"+teacherPaper.publishTime+"</td>"+
                "<td>"+teacherPaper.record+"</td>"+
                "<td>"+teacherPaper.citation+"</td>"+
                "<td>"+
                "<a href='#' id='remove' class='icon-trash' eid="+teacherPaper.id+" >删除</a></td>"+
                "</tr>"
        );
      })

    },"json");
  }
</script>
</body>
</html>
